# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=goddi
pkgver=1.2
pkgrel=2
groups=('blackarch' 'blackarch-recon' 'blackarch-windows')
pkgdesc='Dumps Active Directory domain information.'
arch=('x86_64' 'aarch64')
url='https://github.com/NetSPI/goddi'
license=('BSD')
depends=('glibc')
makedepends=('git')
source=("https://github.com/NetSPI/goddi/releases/download/v$pkgver/goddi-linux-amd64")
sha512sums=('ebbddabfb08e6b48245e3c107206811a79d1ee8b1c0bd176b7803e489ff708b0b03ac50bd9d9afd3b7b15ea55f7520d5d451a1a9d64905827b8479e34448b198')

package() {
  install -dm 755 "$pkgdir/usr/bin"

  install -Dm 755 goddi-linux-amd64 "$pkgdir/opt/$pkgname/goddi-linux-amd64"

  cat > "$pkgdir/usr/bin/$pkgname" << EOF
#!/bin/sh
exec /opt/$pkgname/goddi-linux-amd64 "\$@"
EOF

  chmod +x "$pkgdir/usr/bin/$pkgname"
}

